<template>
	<view>
		<u-cell-group >
			<!-- <u-cell-item icon="account" title="账号名称" :value="'Charon'" :arrow="false"></u-cell-item> -->
			<u-cell-item icon="integral" title="登录账号" :value="userinfo.userCode" :arrow="false"></u-cell-item>
			<u-cell-item icon="car-fill" title="补液记录" @tap="$jumpPage('/pages/supplyRecords/supplyRecords')"></u-cell-item>
			<!-- <u-cell-item title="重置密码" ></u-cell-item> -->
			<u-cell-item title="退出登录" @tap="loginOut"></u-cell-item>
		</u-cell-group>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	computed:{
		userinfo() {
			return this.$store.state.userinfo
		}
	},
	methods:{
		loginOut() {
			uni.showModal({
				title:'提示',
				content:'您确定要退出登录吗?',
				success: (res) => {
					if(res.confirm) {
						uni.removeStorageSync('token');
						uni.reLaunch({
							url:'/pages/login/login'
						})
					}
				}
			})
		}
	}
};
</script>

<style lang="scss" scoped>
	
</style>
